<template>
    <div class="first-div">
        <top-bar/>
        <div class="com-div" v-for="item in comItem" :is="item.component" :key="item.id">
        </div>

    </div>
</template>

<script>
    import topBar from '@/components/topbar/TopBar'
    import cmsSwiper from "@/components/swiper/CmsSwiper";
    import cmsService from "@/components/service/CmsService"
    import cmsHonor from "@/components/honor/CmsHonor";
    import cmsCase from "@/components/case/CmsCase"
    import cmsCulture from "@/components/culture/CmsCulture"
    import cmsNotice from "@/components/notice/CmsNotice"
    import cmsNews from "@/components/news/CmsNews"
    import cmsJob from "@/components/job/CmsJob"
    import cmsProduct from "@/components/product/CmsProduct"
    import cmsLink from "@/components/link/CmsLink"
    import cmsMessage from "@/components/message/CmsMessage"
    import colunmApi from "@/api/colunmApi"
    export default {
        name: "AboutMe",
        components:{
            cmsSwiper, topBar,cmsService,cmsHonor,cmsCase,cmsCulture,cmsNotice,cmsNews,cmsJob,cmsProduct,cmsLink,cmsMessage,
        },
        data(){
            return{
                colunmId:'3580ba6737820f404f13cb0d7cf93a0f',
                comItem:[],
            }

        },
        created:async function(){
            let res = await colunmApi.getColunmDetail(this.colunmId)
            if (res.code == '200'){
                let ids = res.data.sysColunmId.split(",")
                ids.forEach(item=>{
                    let html = '';
                    html += "cms"+item.charAt(0).toUpperCase() + item.slice(1)
                    this.comItem.push({
                        'component':html
                    })
                })
            }
        }
    }
</script>

<style scoped>

</style>